/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.fiap.view;

import br.com.fiap.modelos.DadosForm;
import br.com.fiap.modelos.DadosSac;
import br.com.fiap.persistencia.DAOWeb;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Jose Arce - rm64586
 */

@WebServlet(urlPatterns="/relatorioReclamacoes")
public class RelatorioReclamacao extends HttpServlet {

    private DAOWeb daoWeb;
    
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        List<DadosForm> dados = (List<DadosForm>) req.getAttribute("modelo");
        
        String HTML = "<HTML><BODY>";	
        for(DadosForm tmp : dados)
        {
            HTML += "<table>"
            + "<row>"+tmp.getId()+"</row>"
            + " "        
            + "<row>"+tmp.getNome()+"</row>";   
            HTML += "</table>";
        }
        HTML += "</BODY></HTML>";
        
        resp.getWriter().write(HTML);
        
    }
    
    
}
